<?php

/**
 * simple_file - Simple file upload object
 *
 * @package
 * @author Alexis Eric
 * @copyright Copyright (c) 2012 - Erra Prod
 * @version $1.0$
 * @access public
 */
class Std_FileObject extends Erra_Fields_Base_Object {

    function __construct($objectId, $buildArgs = null) {
        parent::__construct($objectId, $buildArgs);

        $file_content = Erra_Fields_File::create('file_content')
                ->setDescription(__('File content'));

        $this->addFields($file_content);
    }

    public function __render($displayArgs = null) {
        $res = __('File path : ') . config_get('path.public_upload_directory') . '/' . $this->file_content->value;
        return $res;
    }

}

?>